namespace LeadThing.AbpZeroTemplate.Migrations
{
    using System;
    using System.Collections.Generic;
    using System.Data.Entity.Infrastructure.Annotations;
    using System.Data.Entity.Migrations;

    public partial class Add_CaseCategory : DbMigration
    {
        public override void Up()
        {
            CreateTable(
                "Basic.CaseCategory",
                c => new
                {
                    Id = c.Long(nullable: false, identity: true),
                    Title = c.String(maxLength: 100),
                    ParentID = c.Int(nullable: false),
                    ClassList = c.String(maxLength: 500),
                    Layer = c.Int(nullable: false),
                    SortID = c.Int(nullable: false),
                    Content = c.String(maxLength: 4000),
                    IsDeleted = c.Boolean(nullable: false),
                    DeleterUserId = c.Long(),
                    DeletionTime = c.DateTime(),
                    LastModificationTime = c.DateTime(),
                    LastModifierUserId = c.Long(),
                    CreationTime = c.DateTime(nullable: false),
                    CreatorUserId = c.Long(),
                },
                annotations: new Dictionary<string, object>
                {
                    { "DynamicFilter_CaseCategory_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
                })
                .PrimaryKey(t => t.Id);

        }

        public override void Down()
        {
            DropTable("Basic.CaseCategory",
                removedAnnotations: new Dictionary<string, object>
                {
                    { "DynamicFilter_CaseCategory_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
                });
        }
    }
}
